<?php
/**
 * Created by PhpStorm.
 * User: lb
 * Date: 2017/7/5
 * Time: 0:51
 */
namespace app\controllers;
use app\models\EntryLogin;
use Yii;
use yii\web\Controller;
use yii\web\Response;

class EntryController extends Controller
{
    public $layout = 'entry';

    public function actionIndex(){
        $model = new EntryLogin();
        if ($model->load(Yii::$app->request->post()) && $model->login()) {
            
            return $this->redirect('?r=/main/index',200);
        }
        return $this->render('index', [
            'model' => $model,
        ]);
    }

}